import request from '@/utils/request'

export default {

    //添加课程信息
    addCourseInfo(courseInfo){
        return request({
            url: '/eduservice/course/addCourseInfo',//需要拼接数据用"`",不需要的话也可以用"'"
            method: 'post',
            data: courseInfo
          })
    },
    //查询所有教师
    getListTeacher(){
        return request({
            url: '/eduservice/teacher/findAll',
            method: 'get'
          })
    },
    //根据id查询课程信息
    getCourseInfo(courseId){
        return request({
            url: '/eduservice/course/getCourseInfo/'+courseId,
            method: 'get'
          })
    },

    //修改课程信息
    updateCourseInfo(courseInfoVo){
        return request({
            url: '/eduservice/course/updateCourseInfo',
            method: 'post',
            data:courseInfoVo
          })
    },
    //课程确认信息显示
    getPublishCourseInfo(courseId){
        return request({
            url: '/eduservice/course/getPublishCourseInfo/'+courseId,
            method: 'get'
          })
    },
    //课程最终发布
    publishCourse(courseId){
        return request({
            url: '/eduservice/course/publishCourse/'+courseId,
            method: 'post'
          })
    },
    //带条件分页查询课程信息
    getCourseListPage(current,limit,searchObj){
        return request({
            url: `/eduservice/course/pageCourseCondition/${current}/${limit}`,
            method: 'post',
            data:searchObj
          })
    },
    //删除课程
    removeCourse(courseId){
        return request({
            url: '/eduservice/course/removeCourse/'+courseId,
            method: 'delete'
          })
    },



}
